﻿using System;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000360 RID: 864
public class SceneFade : SimpleFade
{
	// Token: 0x0600158E RID: 5518 RVA: 0x00092688 File Offset: 0x00090888
	protected override void Awake()
	{
		base.Awake();
		this.image = base.GetComponent<Image>();
		this.canvas = this.image.canvas;
		this.canvasRt = (this.canvas.transform as RectTransform);
		this.sortingOrder = this.canvas.sortingOrder;
	}

	// Token: 0x0600158F RID: 5519 RVA: 0x000926E0 File Offset: 0x000908E0
	protected override void Update()
	{
		base.Update();
		this.image.color = this._Color;
		this.image.rectTransform.sizeDelta = new Vector2(this.canvasRt.rect.width, this.canvasRt.rect.height);
		int num = this.canvas.sortingOrder;
		this.canvas.sortingOrder = ((!base.IsFadeNow) ? -32768 : this.sortingOrder);
		if (num != this.canvas.sortingOrder)
		{
			this.canvas.enabled = false;
			this.canvas.enabled = true;
		}
	}

	// Token: 0x06001590 RID: 5520 RVA: 0x0009279C File Offset: 0x0009099C
	protected override void OnGUI()
	{
	}

	// Token: 0x040019A9 RID: 6569
	private Canvas canvas;

	// Token: 0x040019AA RID: 6570
	private RectTransform canvasRt;

	// Token: 0x040019AB RID: 6571
	private Image image;

	// Token: 0x040019AC RID: 6572
	private int sortingOrder = -32768;
}
